package br.com.massai.model.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;

import br.com.massai.view.enums.StatusEnum;

@Entity
@SequenceGenerator(name = "seqGrupoProducao", sequenceName = "seq_grupo_producao", allocationSize = 1)
@NamedQueries({@NamedQuery (name="GrupoProducao.findAll", query="SELECT gp FROM GrupoProducao gp")})
public class GrupoProducao implements Serializable {

	private static final long serialVersionUID = -7066543319875643675L;

	@Id
	@Column(name = "ID_GRUPO_PRODUCAO")
	@GeneratedValue(generator = "seqGrupoProducao", strategy = GenerationType.SEQUENCE)
	private Long id;
	
	@Column(name = "DESCRICAO", length = 255, unique = true, columnDefinition = "VARCHAR(255)")
	private String descricao;
	
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "STATUS")
	private StatusEnum status;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public StatusEnum getStatus() {
		return status;
	}

	public void setStatus(StatusEnum status) {
		this.status = status;
	}
}
